3.171 \(\int \frac {8+x^2}{6-5 x+x^2} \, dx\)

Optimal. Leaf size=18 \[ x-12 \log (2-x)+17 \log (3-x) \]

[Out]

x-12*ln(2-x)+17*ln(3-x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {1657, 632, 31} \[ x-12 \log (2-x)+17 \log (3-x) \]

Antiderivative was successfully verified.

[In]

Int[(8 + x^2)/(6 - 5*x + x^2),x]

[Out]

x - 12*Log[2 - x] + 17*Log[3 - x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {8+x^2}{6-5 x+x^2} \, dx &=\int \left (1+\frac {2+5 x}{6-5 x+x^2}\right ) \, dx\\ &=x+\int \frac {2+5 x}{6-5 x+x^2} \, dx\\ &=x-12 \int \frac {1}{-2+x} \, dx+17 \int \frac {1}{-3+x} \, dx\\ &=x-12 \log (2-x)+17 \log (3-x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 1.00 \[ x-12 \log (2-x)+17 \log (3-x) \]

Antiderivative was successfully verified.

[In]

Integrate[(8 + x^2)/(6 - 5*x + x^2),x]

[Out]

x - 12*Log[2 - x] + 17*Log[3 - x]

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 14, normalized size = 0.78 \[ x - 12 \, \log \left (x - 2\right ) + 17 \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="fricas")

[Out]

x - 12*log(x - 2) + 17*log(x - 3)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 16, normalized size = 0.89 \[ x - 12 \, \log \left ({\left | x - 2 \right |}\right ) + 17 \, \log \left ({\left | x - 3 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="giac")

[Out]

x - 12*log(abs(x - 2)) + 17*log(abs(x - 3))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 15, normalized size = 0.83 \[ x +17 \ln \left (x -3\right )-12 \ln \left (x -2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+8)/(x^2-5*x+6),x)

[Out]

x-12*ln(x-2)+17*ln(x-3)

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 14, normalized size = 0.78 \[ x - 12 \, \log \left (x - 2\right ) + 17 \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+8)/(x^2-5*x+6),x, algorithm="maxima")

[Out]

x - 12*log(x - 2) + 17*log(x - 3)

________________________________________________________________________________________

mupad [B]  time = 3.92, size = 14, normalized size = 0.78 \[ x-12\,\ln \left (x-2\right )+17\,\ln \left (x-3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 + 8)/(x^2 - 5*x + 6),x)

[Out]

x - 12*log(x - 2) + 17*log(x - 3)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 14, normalized size = 0.78 \[ x + 17 \log {\left (x - 3 \right )} - 12 \log {\left (x - 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+8)/(x**2-5*x+6),x)

[Out]

x + 17*log(x - 3) - 12*log(x - 2)

________________________________________________________________________________________